package com.ctaa.ctaa.controller;

import com.ctaa.ctaa.dto.Result;
import com.ctaa.ctaa.pojo.AppVersionPojo;
import com.ctaa.ctaa.service.AppVersionService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("app")
public class AppVersionController {


    @Resource
    AppVersionService appVersionService;

    @GetMapping("/latest")
    public Result<AppVersionPojo> findAppLastVersion(String type) {
        return appVersionService.searchLastAppVersion(type);
    }

}
